import type {App} from 'vue'
import * as svg from '@element-plus/icons-vue';
import SvgIcon from '@/components/SvgIcon/index.vue'

export default function (app: App) {
    app.component('svg-icon', SvgIcon)

    // import.meta.glob('./svg/*.svg')
    // import.meta.globEager('./svg/*.svg')

    // 循环遍历并注册 所有的图标组件  注册成全局组件 以ele-xxxx
    const icons = svg as any;
    for (const i in icons) {
        app.component(`ele-${icons[i].name}`, icons[i]);
    }
    app.component('SvgIcon', SvgIcon);
}



